export default class LastMayday {
  palette(qrcode) {

    return ({
      width: '590rpx',
      height: '772rpx',
      borderRadius: '24rpx',
      views: [

        {
          type: 'image',
          url: 'https://static.hzddyy.com/saas_static_files_/aSOv1vkSdXUyxJD2jRi1S619WMzWthiV112iyNwnc5M.png',
          css: {
            width: '590rpx',
            height: '604rpx',
            mode: 'scaleToFill',

          },
        },
        {
          type: 'image',
          url: 'https://static.hzddyy.com/saas_static_files_/7Axx5ed3SqNO8JfTZBaWSxqxkSlG2kq0GxrlPAwkJIs.png',
          css: {
            width: '176rpx',
            height: '56rpx',
            mode: 'scaleToFill',
            bottom: '80rpx',
            left: '40rpx'
          },
        },
        {
          type: 'text',
          text: '识别二维码，下载APP体验吧~',
          css: [{
            left: '40rpx',
            bottom: '34rpx',
            fontSize: '28rpx',
            color: '#77828F',
          }],
        },
        {
          type: 'qrcode',
          content: qrcode,
          css: {
            bottom: '28rpx',
            right: '40rpx',
            width: '120rpx',
            height: '120rpx',
          }
        },

      ],
    });
  }
}

const startTop = 50;
const gapSize = 70;
const common = {
  left: '20rpx',
  fontSize: '40rpx',
};

function _textDecoration(decoration, index, color?: String) {
  return ({
    type: 'text',
    text: decoration,
    css: [{
      top: `${startTop + index * gapSize}rpx`,
      color: color,
      textDecoration: decoration,
    }, common],
  });
}
